import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
  {
    path: '/',
    name: 'TabRouteView',
    component: () => import('./views/TabRouteView.vue'),
    children: [
      {
        path: '',
        name: 'Home',
        component: () => import('./views/Home.vue'),
      },
      {
        path: 'User',
        name: 'User',
        component: () => import('./views/User.vue'),
      },
    ],
  },
  {
    path: '/Yang',
    name: 'Yang',
    component: () => import('./views/Yang.vue'),
  },
  {
    path: '/guanzhu1',
    name: 'guanzhu1',
    component: () => import('./views/guanzhu1.vue'),
  },
  {
    path: '/tongcheng',
    name: 'tongcheng',
    component: () => import('./views/tongcheng.vue'),
  },
  {
    path: '/sousuo',
    name: 'sousuo',
    component: () => import('./views/sousuo.vue'),
  },
  {
    path: '/soushipin',
    name: 'soushipin',
    component: () => import('./views/soushipin.vue'),
  },
  {
    path: '/pinlunqu',
    name: 'pinlunqu',
    component: () => import('./views/pinlunqu.vue'),
  },
  {
    path: '/zdpinlunqu',
    name: 'zdpinlunqu',
    component: () => import('./views/zdpinlunqu.vue'),
  },
  {
    path: '/zdguanzhu',
    name: 'zdguanzhu',
    component: () => import('./views/zdguanzhu.vue'),
  },
]
const router = createRouter({
  history: createWebHashHistory(),
  // history: createWebHashHistory(import.meta.env.BASE_URL),
  routes,
})

window.$router = router
Object.defineProperty(window, '$route', {
  get () {
    return router.currentRoute.value
  },
})
export default router
